PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


DrawThemeTitleBarWidget

Draws a close box, zoom box, or collapse box.

pascal OSStatus DrawThemeTitleBarWidget (
                     ThemeWindowType flavor,
                     const Rect *contRect,
                     ThemeDrawState state,
                     const ThemeWindowMetrics *metrics,
                     ThemeWindowAttributes attributes,
                     ThemeTitleBarWidget widget);
flavor
A value of type ThemeWindowType . Pass a constant specifying the type of window for which to draw a title bar item. See Theme Window Type Constants for descriptions of possible values.
contRect
A pointer to a structure of type Rect . Before calling DrawThemeTitleBarWidget , specify the rectangle for which you wish to draw a title bar item, in coordinates local to the current port. This rectangle is typically the content rectangle of a window.
state
A value of type ThemeDrawState . Pass a constant-- kThemeStateActive , kThemeStateInactive , or kThemeStatePressed --appropriate to the current state of the title bar item. See Theme Draw State Constants for descriptions of these values.
metrics
A pointer to a structure of type ThemeWindowMetrics . Before calling DrawThemeTitleBarWidget , set the structure to contain information describing the window for which you wish to draw a title bar item.
attributes
A value of type ThemeWindowAttributes . Pass one or more constants corresponding to the window's current visual attributes. See Theme Window Attribute Constants for descriptions of possible values. Pass 0 if the window has none of the enumerated attributes.
widget
A value of type ThemeTitleBarWidget . Pass a constant--kThemeWidgetCloseBox, kThemeWidgetZoomBox, or kThemeWidgetCollapseBox--appropriate to the type of title bar item you wish to draw. See Theme Title Bar Item Constants for descriptions of these values.
function result
A result code; see Result Codes .
DISCUSSION

The DrawThemeTitleBarWidget function draws theme-compliant title bar items. Your application should not typically need to call this function; DrawThemeTitleBarWidget is typically of use only for applications that need to draw title bar items of simulated windows. Note that while the DrawThemeWindowFrame function automatically draws all title bar items, your application must call the DrawThemeTitleBarWidget function during tracking, to ensure that the title bar items' states are drawn correctly.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)